/**
 * 
 */
package de.cbf.cam.dsa.facet.garment.persister.mock.service;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import de.cbf.cam.dsa.facet.garment.persister.mock.ServicePersister_FacetGarment_Mock;
import de.cbf.cam.dsa.facet.garment.service.persister_interface.IServicePersister_FacetGarment;

/**
 * @author Nebelritter
 *
 */
public class ServiceFactoryPersister_FacetGarment_Mock implements ServiceFactory<IServicePersister_FacetGarment> {

	protected ServicePersister_FacetGarment_Mock service;



	@Override
	public IServicePersister_FacetGarment getService(Bundle bundle,
			ServiceRegistration<IServicePersister_FacetGarment> registration) {
		if(service == null){
			service = new ServicePersister_FacetGarment_Mock();		
		}
		return service;
	}

	@Override
	public void ungetService(Bundle bundle,
			ServiceRegistration<IServicePersister_FacetGarment> registration,
			IServicePersister_FacetGarment service) {
		this.service = null;
	}	
}
